﻿using SimpleFactory.AbstractProduct;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleFactory.Product
{
    // 取余
    public class Surplus: Operator
    {
        public override double GetResult()
        {
            if (NumberB == 0)
                throw new Exception("除数不能为零！");
            return NumberA % NumberB;
        }
    }
}
